package com.smmisia.article.entity.convetor;


import com.smmisia.article.dto.socket.MessageDTO;
import com.smmisia.article.entity.Message;
import org.mapstruct.Mapper;
import org.mapstruct.NullValueCheckStrategy;
import org.mapstruct.factory.Mappers;

import java.util.List;

@Mapper(nullValueCheckStrategy = NullValueCheckStrategy.ALWAYS)
public interface MessageConvertor {

    MessageConvertor INSTANCE = Mappers.getMapper(MessageConvertor.class);

    public static final int DEFAULT_MIN_SALE_TIME = 60;

    /**
     * mapper to dto
     * @param request
     * @return
     */
    public List<MessageDTO> mapToList(List<Message> request);
}
